#pragma once
#include "core.h"
#include <string>

enum ShaderType
{
	COMPILE,LINK
};

class Shader {
public:
	Shader(const char* vertexPath,const char* fragementPath);
	~Shader();
	void begin();//开始使用当前的shader
	void end();//结束使用当前的shader
	void setFloat(const std::string& name, float value); //设置Uniform变量
	GLuint getProgram();
private:
	void checkShaderErrors(GLuint target, ShaderType type);
private:
	GLuint program = 0;
};